<template>
  <div class='headers'>
    <Table :modelData="modelData" :listData="listData" :pageInfo="pageInfo"></Table>
  </div>
</template>
<script>
import Table from "../../components/table";
export default {
  components: { Table },
  name: "",
  data() {
    return {
      modelData: [
        { myType: "index", label: "序号" },
        { myType: "normal", prop: "", label: "姓名" },
        { myType: "normal", prop: "", label: "角色" },
        { myType: "img",    prop: "img", label: "头像" },
        { myType: "normal", prop: "", label: "电话" },
        { myType: "normal", prop: "", label: "部门" },
        { myType: "normal", prop: "", label: "桌号" },
        {
          myType: "operate",
          label: "管理",
          btns: [
            {
              label: "编辑",
              click: this.edit,
              icon: require("../../assets/images/manageHome/edit.png")
            },
            {
              label: "删除",
              click: this.delete,
              icon: require("../../assets/images/manageIssues/delete.png")
            }
          ],
          width: "180"
        }
      ],
      listData: [
        {img:'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3014768788,2397820870&fm=27&gp=0.jpg'},
        {},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
      ],
      pageInfo: {
        page: 1,
        total: 10,
        size: 10,
        changePage: this.changePage
      }
    };
  },
  methods: {
    // 新增
    add() {
      this.$store.state.add.show = true;
    },
    edit(scope) {
      this.add();
    },
    // 删除
    delete(scope) {
      this.$store.state.confirmInfo.message = "是否确认删除？";
      this.$store.state.confirmInfo.show = true;
    },
    // 翻页
    changePage() {}
  },
  created() {}
};
</script>
<style lang="scss" scoped>
.headers {
  height: 100%;
  flex-grow: 1;
}
</style>